package yhao.demo.service.person.dubbo;

import org.springframework.stereotype.Service;
import yhao.demo.service.person.apilist.model.PersonModel;
import yhao.demo.service.person.dao.PersonDao;
import yhao.demo.service.person.dubboapi.PersonDubbo;

import javax.annotation.Resource;

/**
 * @author yoara
 * <p> Created on 2019/3/29 </p>
 */
@Service
public class PersonDubboImpl implements PersonDubbo {
    @Resource
    private PersonDao personDao;

    @Override
    public String showNameById(String id) {
        PersonModel person = personDao.selectById(id);
        return person==null?"用户不存在":person.getName();
    }
}
